<template>
    <div class="pad">
        <!-- table start  -->
        <tableDataEl
                :page.sync="page"
                :pageSize.sync="pageSize"
                :tableData="tableData.list"
                :tableLabel="tableLabel"
                height="89vh"
                ImgText="支付凭证"
                v-loading="loading"
        />
        <!-- table end -->
    </div>
</template>

<script>
    import tableDataEl from '@/views/Setup/common/table'
    export default {
        name: "rejected",
        components: {
            tableDataEl
        },
        data () {
            return {
                page: 1,
                pageSize: 8,
                tableData: [],
                tableLabel: [
                    {
                        label: '运营商名称',
                        prop: 'company'
                    },
                    {
                        label: '联系方式',
                        prop: 'phone'
                    },
                    {
                        label: '负责人',
                        prop: 'leader'
                    },
                    {
                        label: '支付凭证',
                        prop: 'usecost',
                        image: true
                    },
                    {
                        label: '申请时间',
                        prop: 'create_time'
                    },
                    {
                        label: '驳回时间',
                        prop: 'audit_time'
                    },
                    {
                        label: '驳回理由 ',
                        prop: 'reason'
                    },
                    {
                        label: '审核人',
                        prop: 'audit_person'
                    }
                ],
                loading: false
            }
        },
        methods: {
            async init (search = '') {  //初始化
                this.loading = true;
                let res = await this.api.log_a_addReject({page: this.page, pageSize: this.pageSize});
                res.code ? this.tableData = res.data : this.$message(res.msg);
                this.loading = false;
            }
        },
        mounted () {
            this.init()
        },
        watch: {
            page () {
                this.init()
            },
            pageSize () {
                this.init()
            }
        }

    }
</script>

<style scoped>
    .pad {
        padding: 10px;
    }
</style>
